package com.jiashihui.schema_lgorithm.schema.iterator;

/**
 * @author jiashihui
 * @describe: 迭代器接口
 * @date 2019/03/15
 */
public interface Iterator {

    /**
     * 前移
     *
     * @author jiashihui
     */
    Object previous();

    /**
     * 后移
     *
     * @author jiashihui
     */
    Object next();

    /**
     * 判断后面是否还有集合元素
     *
     * @author jiashihui
     */
    boolean hasNext();

    /**
     * 取得第一个元素
     *
     * @author jiashihui
     */
    Object first();

}
